/**
 * 面板管理类
 */

import { MainPanel } from './../../views/MainPanel';
import { LoadPanel } from './../../views/before/LoadPanel';
import { MainPop } from './../../views/MainPop';
import { PackPanel } from './../../views/pack/PackPanel';
import { PopUpManager } from './PopUpManager';

export module PanelManager {

    export var panels: any = {};

    export var load: LoadPanel;
    /** 资源加载 */
    export function openLoad(): void {
        let panel = new LoadPanel();
        PopUpManager.openPanel(panel);
    }

    export var main: MainPanel;
    /** 主界面 */
    export function openMain(): void {
        let panel = new MainPanel();
        PopUpManager.openPanel(panel);
    }

    export var pack: PackPanel;
    /** 背包界面 */
    export function openPack(): void {
        let panel = new PackPanel();
        PopUpManager.openPanel(panel);
    }

    /** 弹窗1 */
    export function openPop(): void {
        let pop = new MainPop();
        PopUpManager.openPop(pop);
    }
}
